﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using nhannguyentn.Models;

namespace nhannguyentn.Controllers
{
    public class BlogPostController : Controller
    {
        //
        // GET: /BlogPost/

        public ActionResult Index()
        {
            return View();
        }

        public object GetPosts()
        {
            var post = BlogPostModel.Objects.ToList();
            return Json(post, JsonRequestBehavior.AllowGet);
        }

    }
}
